package com.r2coding.server.modules.file.converter;

import com.r2coding.server.modules.file.entity.UserFile;
import com.r2coding.server.modules.file.vo.FolderTreeNodeVo;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

/**
 * @author 98k灬
 * @version v1.0.0
 * @Description : 功能描述
 * @Create on : 2023/11/7 12:52
 **/
@Mapper(componentModel = "spring")
public interface FileConverter {
    @Mapping(target = "label", source = "record.filename")
    @Mapping(target = "id", source = "record.fileId")
    @Mapping(target = "children", expression = "java(com.google.common.collect.Lists.newArrayList())")
    FolderTreeNodeVo userFile2FolderTreeNodeVO(UserFile record);
}
